package com.qk.mapper;

import com.github.pagehelper.Page;
import com.qk.entity.Role;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface RoleMapper {
    @Insert("insert into role(name, label, remark, create_time, update_time) values (#{name},#{label},#{remark},#{createTime},#{updateTime})")
    void insert(Role role);
    @Delete("delete from role where id=#{id}")
    void deleteById(Integer id);
    //@Update("update role set name=#{name},label=#{label},remark=#{remark},create_time=#{createTime},update_time=#{updateTime}")
    void update1(Role role);

    @Select("select *from role where id=#{id}")
    Role getById(Integer id);

    List<Role> list1(String name, String label);
    @Select("select * from role")
    List<Role> getAll();
}
